<template>
    <van-nav-bar title="详情" left-text="返回" left-arrow @click-left="$router.go(-1)" />
    <van-card num="2" price="2.00" desc="描述信息" title="商品标题"
        thumb="https://fastly.jsdelivr.net/npm/@vant/assets/ipad.jpeg"
        >
        <template #tags>
            <van-tag plain type="primary">标签</van-tag>
            <van-tag plain type="primary">标签</van-tag>
        </template>
        <template #footer>
            <van-button size="mini" @click="jian">-</van-button>
            {{ num }}
            <van-button size="mini" @click="add">+</van-button>
        </template>
    </van-card>
    <div style="display: flex;">
        <van-icon name="cart-o" color="#1989fa" />
        <van-submit-bar :price="3050" button-text="立即支付" @submit="onSubmit" @click="$router.push('/fu')">
            <van-checkbox v-model="checked">全选</van-checkbox>
            <template #tip>
                你的收货地址不支持配送, <span @click="onClickLink">修改地址</span>
            </template>
        </van-submit-bar>
    </div>

</template>

<script setup>
import request from '@/utils/request'
import { ref, onMounted } from 'vue'

let num =ref(1)

const jian=()=>{
    num.value--
}
const add=()=>{
    num.value++
}

const list = ref({})
onMounted(() => {
    request.get('/list', {
        params: {
            pagination: 1,
            pageNum: 30
        }
    }).then(res => {
        if (res.data.code == 200) {
            list.value = res.data.data
        }
    })
}), {
    params: false
}

</script>

<style lang="scss" scoped>
ul {
    column-count: 2;

    li {
        break-inside: avoid;
    }
}
</style>